<?php
class CategoryHideAction extends AdminAction
{
	public function __construct()
	{
		parent::__construct();
		$this->responseType = 'json';
	}
	
	public function execute()
	{
		$this->code			= 400;
		$categoryService	= new CategoryService();
		$cid				= $this->context->post('cid');
		$hide				= $this->context->post('hide');
		if(is_numeric($cid) && $cid && is_numeric($hide))
		{
			$categoryService->hideCategory($cid,$hide);
			$this->code		= 200;
		}
	}
}
